package com.nju.crawler.repository;

import java.util.List;
import java.util.Map;

/**
 * @authorliyunfei
 * @date2022/11/13
 **/
public interface PersistService {
    String SPOT = ".";
    int QUERY_LIMIT_SIZE = 50;
    String PATTERN_STR = "*";
    void batchInsert(List<String> values);
    public void batchInsertByArgs(List<Object[]> args);
    void insert(String value);

    // 查询最后30条数据--top排行榜（存redis缓存）
    List<Map<String,Object>> topListQuery(int limit);

    List<Map<String,Object>> languageListQuery(int limit);

    List<Map<String,Object>> licenseListQuery(int limit);

    void batchInsertUserByArgs(List<Object[]> args);

    void batchInsertUserRepoByArgs(List<Object[]> args);

    /**
     * 用户-用户关注查询
     * @param limit
     * @return
     */
    List<Map<String,Object>> usersListQuery(int limit);

    /**
     * 用户-仓库查询
     * @param limit
     * @return
     */
    List<Map<String,Object>> userRepoListQuery(int limit);

    List<Map<String,Object>> userActivityQuery(int limit);
    List<Map<String,Object>> userCategoryQuery(int limit);
    List<Map<String,Object>> repoPopularQuery(int limit);

    List<Map<String,Object>> repoRecommendQuery(int limit);

}
